/*
 * \brief  IRQ session interface
 * \author Christian Helmuth
 * \date   2007-09-13
 *
 * An open IRQ session represents a valid IRQ attachment/association.
 * Initially, the interrupt is masked and will only occur if enabled. This is
 * done by calling wait_for_irq(). When the interrupt is delivered to the
 * client, it was acknowledged and masked at the interrupt controller before.
 *
 * Disassociation from an IRQ is done by closing the session.
 */

/*
 * Copyright (C) 2007-2009 Christian Helmuth
 * Genode Labs, Feske & Helmuth Systementwicklung GbR
 *
 * This file is part of the Genode OS framework, which is distributed
 * under the terms of the GNU General Public License version 2.
 */

#ifndef _INCLUDE__IRQ_SESSION__IRQ_SESSION_H_
#define _INCLUDE__IRQ_SESSION__IRQ_SESSION_H_

#include <base/capability.h>

namespace Genode {

	class Irq_session
	{
		protected:

			enum Opcode { WAIT_FOR_IRQ };

		public:

			static const char *service_name() { return "IRQ"; }

			virtual ~Irq_session() { }

			/**
			 * Wait for interrupt occurence
			 */
			virtual void wait_for_irq() = 0;
	};
}

#endif /* _INCLUDE__IRQ_SESSION__IRQ_SESSION_H_ */
